package com.xxx.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.xxx.enums.StatusEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("`menu`")
public class Menu implements Serializable{
    private String menuName;
    @TableId(type = IdType.ASSIGN_ID)
    //过长前端接收long类型会丢失精度  所以要转成string
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long menuId;
    private String menuResource;
    //权限标识
    private String perms;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate createTime;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate updateTime;
    private String createUser;
    private String updateUser;
    //状态 0:正常  1:禁用
    private StatusEnum status;
    @TableField("`delete`")
    @TableLogic // 标记为逻辑删除字段
    private Integer delete;
}
